<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    let arr=[1,'张三',3.423,4,5,6,7,false];
    //数组长度arr.length
    for(let i=0;i<arr.length;i++){
        console.log(arr[i]);
    }

    console.log('-------------------')
    arr[4]='数学';
    arr[5]='语文';
    for(let i=0;i<arr.length;i++){
        console.log(arr[i])
    }
    console.log(arr.length);//8
    arr[1000]=1232;
    console.log(arr.length);//1001
    console.log('-----------------');
    console.log(99 in arr);//arr[99]:underfined             false
    console.log(1 in arr);//arr[1]:'张三'                  true
    console.log(1200 in arr);//arr[1200]:下标超过数组长度      false  
</script>
</html>